<!DOCTYPE html>
<html>
<head>
<meta charset="UTF-8" />
<title> POI 页 </title>
<style>
*,body,dl,dt,dd,ul,li,label {margin:0; padding:0; }
li { list-style:none; list-style-type:none; }
body { color:#333; font:12px Simsun; height:1251px; }
a,img { border:none; vertical-align:top; }
a { color:#94683E; text-decoration:none; }
.poiheader { width:885px; margin:0 auto; padding:34px 0 0 0; height:56px; overflow:hidden; }
	.poiheader img { float:left; margin-right:20px; }
	.poiheader span { display:block; float:left; color:#94683E; font-size:19px; font-family:"微软雅黑"; padding-top:27px; }
.poimainer { width:860px; height: 1120px; margin:0 auto; padding-left:25px; overflow:hidden; }
	.poimainer .poi { position:relative; float:left; margin:25px 20px 0 0; width:404px; height:186px; border-top:#FFF 5px solid; border-left:#FFF 5px solid; background-color:#BDE; }

	.poimainer .poi dl { position:absolute; margin-top:-5px; margin-left:-5px; width:383px; height:164px; padding:5px 10px 15px 10px; border:#39C 1px solid; background:#FFF url(<?php echo $this->skin_url?>/frontend/default/images/poibg.gif) no-repeat 0 0; overflow:hidden;}
	.poimainer .poi dl h1 { display:block; font-size:20px; font-family:"微软雅黑"; color:#1A4EB6; font-weight:100; height:45px; overflow:hidden; }
	.poimainer .poi dl h1 span { display:block; line-height:20px; }
	.poimainer .poi dl h1 span.size { line-height:40px; }

	.poimainer .poi dl dt { float:left; width:140px; margin-right:10px; overflow:hidden; height:100%; }
	.poimainer .poi dl dt label { display:block; padding:4px; border:#DDD 1px solid; background-color:#FFF;  }
	.poimainer .poi dl dt label img { width:130px; height:96px; overflow:hidden; }
	.poimainer .poi dl dt span { display:block; color:#DDD; text-align:center; height:18px; padding-top:7px; }

	.poimainer .poi dl dt span a.no { color:#AAA; }

	.poimainer .poi dl dd { float:left; width:230px; height:115px; padding:5px 0; border-top:#DDD 1px dotted; }
	.poimainer .poi.off dl dd { background:url("pub/skin/frontend/default/images/ebookstrz.gif") no-repeat right bottom; }

	.poimainer .poi dl dd ul { padding-top:8px; }
	.poimainer .poi dl dd ul label { color:#AAA; }
	.poimainer .poi dl dd ul b { color:#1A4EB6; }

	.poimainer .poi.bgs { background-color:#BEBEBE; }
	.poimainer .poi.bgs dl { background-color:#EAF5FA; background-position:-404px 0; }
.hr { clear:both; width:500px; height:50px; margin:0 auto; margin-bottom: 30px; border-bottom:#AAA 1px solid; overflow:hidden; }
</style>

<script type="text/javascript" language="javascript" src="/pub/share/js/jquery/jquery.js"></script>
<script>
$(function(){
	var h1 = $(".poimainer h1 > span").addClass('size');
	for(var i=0; i<h1.length;i++){
		var sp = $(h1[i]);
		var num = sp.html().length;
		if(num > 20){
			var size = parseInt(sp.css("font-size"));
			var si = size-(num-20)<14?14 : size-((num-20)/1);
			sp.css({"font-size": si});
			if(num > 27) sp.removeClass();
		}
	}
})
</script>
<?php
        $ebook = $this->ebook;
        $pois= $this->pois;
        $road = $this->road;
?>
</head>
<body>
<div class="poiheader">
	<img src="/pub/media/example/logotemp.jpg" width="172" />
	<span><?php echo $road->getDistrictName()?><font size="+1" face="Simsun">·</font>
                <?php echo $road->getTownstreetName()?><font size="+1" face="Simsun">·</font>
                        <?php echo $road->getRoadName()?>
        </span>
</div>
<div class="poimainer">
    <?php
        $classes = array('poi off', 'poi', 'poi bgs off', 'poi bgs');
        $size = min($ebook->getPoiPageSize(),count($pois));
        for($i = 0;$i< $size;$i++):
            $classIndex = $i % 4;
    ?>
	<div class="<?php echo $classes[$classIndex] ?>">
		<dl>
			<h1><span><?php echo $pois[$i]->getShopName()?></span></h1>
			<dt>
				<label><img src="<?php echo $this->getStorefrontPicture($pois[$i]->getRoadId(), $pois[$i]->getStorefrontPicture()) ?>" /></label>
				<span><a class="no" href="javascript:void(0);">店家名片</a> | <a class="no" href="javascript:void(0);">进入地图</a></span>

			</dt>
			<dd>
				<ul><label>地址：</label><?php echo $pois[$i]->getAddress()?></ul>
				<ul><label>电话：</label><b>
                                <?php
                                    $phoneIndex = 0;
                                    $businessPhones = explode(',', $pois[$i]->getBusinessPhone());
                                    $moblies = explode(',',$pois[$i]->getMobile());
                                    $phones = array_merge($businessPhones,$moblies);
                                    if(!empty($phones)):
                                        for($phoneIndex;$phoneIndex<2 && !empty($phones[$phoneIndex]);$phoneIndex++):
                                                echo str_replace('0757-', '', $phones[$phoneIndex]);
                                                if($phoneIndex<1 && !empty($phones[$phoneIndex+1])):
                                                    echo ',';
                                                endif;
                                        endfor;
                                    endif;
                                ?></b></ul>
				<ul><label>经营内容：</label><?php echo $pois[$i]->getBusinessScope()?></ul>
				<ul><label>营业时间：</label><?php echo  $pois[$i]->getBusinessHours()?></ul>

			</dd>
		</dl>
	</div>
    <?php endfor;?>
    
</div>
<div class="hr"></div>
</body>
</html>